package demo4;

import javax.imageio.plugins.jpeg.JPEGImageReadParam;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘远望
 * Date: 2025-03-19
 * Time: 10:28
 */
public class Test {
    public static void main(String[] args)
            throws CloneNotSupportedException{
        Person person1 = new Person("zhangsan",24);
        Person person2 = (Person)person1.clone();
        System.out.println(person1);
        System.out.println(person2);
        System.out.println("修改前：" + person1.m.money);
        System.out.println("修改前：" + person2.m.money);
        person2.m.money = 99;
        System.out.println("修改后：" + person1.m.money);
        System.out.println("修改后：" + person2.m.money);

    }
}
